Demulsification of oil-in-water or water-in-oil emulsions can be useful during a wide variety of subterranean treatment operations. For example, Demulsification is important during hydraulic fracturing operations because the presence of emulsions can increase the viscosity of fracturing fluids or produced fluids, decreasing the effective permeability thereof and thus having a negative impact on the overall production. Cruid oil emulsions present in produced petroleum fluids can require the use of post-production chemicals to eliminate them, which may not be a preferred solution.